﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for B_Issue_App
/// </summary>
///
namespace Bestlife.ERP.BusinessRules
{
    public class B_Issue_App
    {
        public B_Issue_App(){

        }

        // public static Boolean Isap(Bestlife.ERP.Entities.E_Issue_Ap id, string user) 
        // {

        // return Bestlife.ERP.DataAccess.D_Issue_Ap.Issu_Ap(id,user);
        //}

         public static int lastissuid()
         {

             return Bestlife.ERP.DataAccess.D_Issue_Ap.lastissuid();

         }

         public static Boolean ins_issue(Bestlife.ERP.Entities.E_Issue_Ap issu, string user)
         {
             return Bestlife.ERP.DataAccess.D_Issue_Ap.insertioissurequest(issu, user);
         }

         public static string get_proname(string proid)
         {
             return Bestlife.ERP.DataAccess.D_receivedstock.getproname(proid);
         }

        public static Boolean ins_ISSU(Bestlife.ERP.Entities.E_Issue_Ap issu,string user)
        {
            return Bestlife.ERP.DataAccess.D_Issue_Ap.insertissu(issu,user);
        }

        public static decimal lastnotappro_issu()
        {
            return Bestlife.ERP.DataAccess.D_Issue_Ap.lastissunot_approve();
        }

        public static Boolean ins_issustock(Bestlife.ERP.Entities.E_Issue_Ap pro, string user)
        {
            return Bestlife.ERP.DataAccess.D_Issue_Ap.ins_issustock(pro, user);
        }

        //public static Boolean ins_phystock(Bestlife.ERP.Entities.E_Issue_Ap issu, string user, string approval, int itemcount)
        //{
        //    return Bestlife.ERP.DataAccess.D_Issue_Ap.ins_issustock(issu, user, approval, itemcount);
        //}

        public static Boolean allapprove_issu(List<Bestlife.ERP.Entities.E_Issue_Ap> app,string user,string approve,int itemcount)
        {
            return Bestlife.ERP.DataAccess.D_Issue_Ap.allissuapprove(app, user, approve, itemcount);
        }

        public static Boolean approve_issu(Bestlife.ERP.Entities.E_Issue_Ap app, string user, string approve, int itemcount)
        {
            return Bestlife.ERP.DataAccess.D_Issue_Ap.receivedissustock(app, user, approve, itemcount);
        }
    }
}